package uk.gov.swmprobation.cplite;

import org.acra.ACRA;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;

import android.app.Application;
import android.content.Context;

@ReportsCrashes(formKey = "1PLYBfZO0OCce7tDFGygcXEIkv8_jlCHCVRG9u5ky3qM",
			formUri = "http://cpvisibility.org/geovation/recieveerror.xql",
			mode = ReportingInteractionMode.NOTIFICATION,
			resToastText = R.string.crash_toast_text,
            resNotifTickerText = R.string.crash_notif_ticker_text,
            resNotifTitle = R.string.crash_notif_title,
            resNotifText = R.string.crash_notif_text,
            resNotifIcon = R.drawable.ic_launcher,
            resDialogIcon = R.drawable.ic_launcher,
            resDialogText = R.string.crash_dialog_text,
            resDialogCommentPrompt = R.string.crash_dialog_comment_prompt,
            resDialogOkToast = R.string.crash_dialog_ok_toast
            )

public class MyApplication extends Application{
	
	public static String versionName;
	
    public void onCreate() {
        super.onCreate();
        ACRA.init(this);
        DatabaseHandler.getInstance(this);
    }
    
    private static MyApplication instance;

    public MyApplication() {
    	instance = this;
    }

    public static Context getContext() {
    	return instance;
    }
    
}
